package mesweb.mesweb;

import com.farvision.common.utils.SpringBeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;

@SpringBootApplication
@ComponentScan(basePackages = {"mesweb.mesweb.**","mesweb.mesweb.service","mesweb.mesweb.config","com.farvision.common.config","messecurity.util","messecurity.config","mesweb.mesweb.vo.mapping","com.farvision.common.exception","com.farvision.common.service.impl"}) //指定扫描包路径
@MapperScan(basePackages = {"mesweb.mesweb.mapper","mesweb.mesweb.mapper.procedure","com.hszh.wms.mbg.PermissionManager.mapper"})
@Import(SpringBeanUtil.class)
@Slf4j
//@EnableScheduling
public class MesWebApplication  implements CommandLineRunner {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public static void main(String[] args) {
        SpringApplication.run(MesWebApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        //log.info("你好 slf4j!");
         //System.out.println("test!");
    }

    @Scheduled(fixedRate = 3000)
    void sleepFixRate(){
        log.info("sleep begin...");
    }
}
